import React from 'react'
import {Redirect} from 'react-router-dom'

import ZZDiscover from '@/pages/discover'
import ZZMine from '@/pages/mine'
import ZZFriend from '@/pages/friend'
import ZZRecommend from '@/pages/discover/c-pages/recommend'
import ZZSongs from '@/pages/discover/c-pages/songs'
import ZZRanking from '@/pages/discover/c-pages/ranking'
import ZZDjradio from '@/pages/discover/c-pages/djradio'
import ZZArtist from '@/pages/discover/c-pages/artist'
import ZZAlbum from '@/pages/discover/c-pages/album'

const routes=[
    {
        path:"/",
        exact:true,
        // component:ZZDiscover
        render:()=>
          (
            <Redirect to="/discover" />
          )
    },
    {
        path:"/discover",
        component:ZZDiscover,
        routes:[
            {
                path:"/discover",
                exact:true,
                render:()=> (
                    <Redirect to="/discover/recommend" />
                )
            },
            {
                path:"/discover/recommend",
                exact:true,
                component:ZZRecommend,
            },
            {
                path:"/discover/songs",
                exact:true,
                component:ZZSongs,
            },
            {
                path:"/discover/ranking",
                exact:true,
                component:ZZRanking,
            },
            {
                path:"/discover/djradio",
                exact:true,
                component:ZZDjradio,
            },
            {
                path:"/discover/artist",
                exact:true,
                component:ZZArtist,
            },
            {
                path:"/discover/album",
                exact:true,
                component:ZZAlbum,
            },
        ]
    },
    {
        path:"/mine",
        exact:true,
        component:ZZMine
    },
    {
        path:"/friend",
        exact:true,
        component:ZZFriend
    },
];

export default routes;
